package com.IntelligentCommunity.community.mapper;

import com.IntelligentCommunity.community.domain.RealArea;
import com.IntelligentCommunity.community.domain.RealDistrict;
import com.IntelligentCommunity.community.domain.Tree;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * 小区Mapper接口
 *
 * @author zzpjx
 * @date 2024-07-19
 */
public interface RealDistrictMapper
{
    /**
     * 查询小区
     *
     * @param id 小区主键
     * @return 小区
     */
    public RealDistrict selectRealDistrictById(Long id);

    /**
     * 查询小区列表
     *
     * @param realDistrict 小区
     * @return 小区集合
     */
    public List<RealDistrict> selectRealDistrictList(@Param("realDistrict") RealDistrict realDistrict, @Param("districtIds") Set<String> districtIds);

    /**
     * 新增小区
     *
     * @param realDistrict 小区
     * @return 结果
     */
    public int insertRealDistrict(RealDistrict realDistrict);

    /**
     * 修改小区
     *
     * @param realDistrict 小区
     * @return 结果
     */
    public int updateRealDistrict(RealDistrict realDistrict);

    /**
     * 删除小区
     *
     * @param id 小区主键
     * @return 结果
     */
    public int deleteRealDistrictById(Long id);

    /**
     * 批量删除小区
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteRealDistrictByIds(Long[] ids);

    List<RealDistrict> selectRealDistrictListCount(RealDistrict realDistrict);

    /**
     * 功能：小区列表查询
     * @return
     */
    List<RealDistrict> districtList();

    List<RealArea> getRealAreaList();


    List<RealDistrict> selectRealDistrictByAreaId(Long id);

    List<Tree> selectTree();

    void insertRealDistrictList(List<RealDistrict> list);

    RealDistrict selectRealDistrictInfoById(Long id);

    List<RealDistrict> getDistrictByAreaId(Long id);
}
